package com.hbuzzs.springcloud.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhangzhishun
 * @since 2020-10-31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("order_info")
@ApiModel(value="OrderInfo对象", description="")
public class OrderInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单ID")
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    @ApiModelProperty(value = "订单时间")
    @TableField("order_time")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "普通用户ID")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "司机ID")
    @TableField("driver_id")
    private Integer driverId;

    @ApiModelProperty(value = "订单状态 0-未接单 1-已接单但司机未到达 2-已接单乘客已到达但未支付 3-乘客已到达并且支付成功")
    @TableField("order_state")
    private String orderState;

    @ApiModelProperty(value = "订单金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "始发地")
    @TableField("origin")
    private String origin;

    @ApiModelProperty(value = "目的地")
    @TableField("destination")
    private String destination;


}
